<?php
include_once("../common.php");
if(isset($_SESSION['idusers'])){
	$c = connect();
	if(isset($_GET['id']))
		mysql_query("UPDATE users SET events_idevents = '".$_GET['id']."' 
			WHERE idusers ='".$_SESSION['idusers']."'");
	else
		mysql_query("UPDATE users SET events_idevents = NULL 
			WHERE idusers ='".$_SESSION['idusers']."'");
	mysql_close($c);
	echo "Registered";
}
?>
